//
//  String+Extension.swift
//  GermanyMedical
//
//  Created by 刘培壮 on 16/9/5.
//  Copyright © 2016年 上海实奥信息科技有限公司. All rights reserved.
//

import UIKit

extension String {
    
    /// UTF-8编码
    var UTF8String: String! {
        return addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
    }
//
//    ///去除br标签改为换行
//    var removeBrLabel : String! {
//        let str = stringByReplacingOccurrencesOfString("<br>", withString: "\n")
//        return str.stringByReplacingOccurrencesOfString("<br/>", withString: "\n")
//    }
// 
//    func textSize(font: UIFont!, boundingSize: CGSize) -> CGSize {
//        return self.boundingRectWithSize(boundingSize, options: .UsesLineFragmentOrigin, attributes: [NSFontAttributeName: font], context: nil).size
//    }
    
//    questionLabel.hs_size = questionLabel.text!.boundingRectWithSize(CGSizeMake(screenWidth - 50,CGFloat(MAXFLOAT)), options: .UsesLineFragmentOrigin, attributes: [NSFontAttributeName: UIFont.systemFontOfSize(20)], context: nil).size

}
